//
//  EOCPerson.m
//  实现description方法
//
//  Created by weiguang on 2017/2/7.
//  Copyright © 2017年 weiguang. All rights reserved.
//

#import "EOCPerson.h"

@implementation EOCPerson

- (id)initWithFirstName:(NSString *)firstName lastName:(NSString *)lastName{
    if (self = [super init]) {
        _firstName = [firstName copy];
        _lastName = [lastName copy];
    }
    return self;
}

- (NSString *)description{
    return [NSString stringWithFormat:@"%@ %@",_firstName,_lastName];
}

- (NSString *)debugDescription{
    return [NSString stringWithFormat:@"<%@: %p, \"%@ %@\">",[self class],self,_firstName,_lastName];
}

- (id)copyWithZone:(NSZone *)zone{
    EOCPerson *copy = [[[self class] allocWithZone:zone] initWithFirstName:_firstName lastName:_lastName];
    return  copy;
}
@end
